﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <!-- DARK BACKGROUND -->
    <LinearGradientBrush x:Key="DarkBackground" StartPoint="0,0" EndPoint="1,1">
        <GradientStop Offset="0" Color="#FF333344"></GradientStop>
        <GradientStop Offset="1" Color="#FF666677"></GradientStop>
    </LinearGradientBrush>

    <!-- GLASS EFFECT -->
    <LinearGradientBrush x:Key="GlassFX" StartPoint=".5,0" EndPoint=".5,.5">
        <GradientStop Offset="1" Color="#33DDDDDD"></GradientStop>
        <GradientStop Offset="1" Color="#33000000"></GradientStop>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GlassFXDisabled" StartPoint=".5,0" EndPoint=".5,.5">
        <GradientStop Offset="1" Color="#33BBBBBB"></GradientStop>
        <GradientStop Offset="1" Color="#11000000"></GradientStop>
    </LinearGradientBrush>

    <!-- GLOW EFFECT -->
    <RadialGradientBrush x:Key="GlowFX" GradientOrigin=".5,1" Center=".5,1">
        <GradientStop Offset="0" Color="#B36C6C6C"></GradientStop>
        <GradientStop Offset=".5" Color="#668B8B8D"></GradientStop>
        <GradientStop Offset="1" Color="#33000000"></GradientStop>
    </RadialGradientBrush>
    <RadialGradientBrush x:Key="GlowFXPressed" GradientOrigin=".5,1" Center=".5,1">
        <GradientStop Offset="0" Color="#66AAAAAA"></GradientStop>
        <GradientStop Offset="1.2" Color="#33FFFFFF"></GradientStop>
    </RadialGradientBrush>
    <LinearGradientBrush x:Key="GlowFXRowPressed">
        <GradientStop Offset="0" Color="#66101010"></GradientStop>
        <GradientStop Offset=".7" Color="#669C9CA0"></GradientStop>
        <GradientStop Offset="1" Color="#66000000"></GradientStop>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GlowFXProgress">
        <GradientStop Offset="0" Color="#661F2021"></GradientStop>
        <GradientStop Offset=".99" Color="#669C9DA0"></GradientStop>
        <GradientStop Offset="1" Color="#00000000"></GradientStop>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GlowFXProgressAnimated" MappingMode="RelativeToBoundingBox">
        <GradientStop Offset="0" Color="#00000000"></GradientStop>
        <GradientStop Offset=".50" Color="#660099FF"></GradientStop>
        <GradientStop Offset="1" Color="#00000000"></GradientStop>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GlowFXTabSelected" StartPoint=".5,1" EndPoint=".5,0">
        <GradientStop Offset="0" Color="#33DDDDDD"></GradientStop>
        <GradientStop Offset="1" Color="#332222FF"></GradientStop>
    </LinearGradientBrush>

    <!-- GLOW ANIMATION -->
    <Storyboard x:Key="GlowOut">
        <DoubleAnimation x:Name="AnimGlowOut" BeginTime="00:00:00" 
                   Storyboard.TargetName="GlowRectangle"
                   Duration="00:00:00.250" 
                   From="1" To="0"
                   Storyboard.TargetProperty="Opacity">
        </DoubleAnimation>
    </Storyboard>
    <Storyboard x:Key="GlowIn">
        <DoubleAnimation x:Name="AnimGlow" 
                   BeginTime="00:00:00" 
                   Storyboard.TargetName="GlowRectangle"
                   Duration="00:00:00.250" 
                   From="0" To="1" 
                   Storyboard.TargetProperty="Opacity">
        </DoubleAnimation>
    </Storyboard>

    <!-- Button  styles here -->
    <Style x:Key="ButtonStyle_tpl" TargetType="{x:Type Button}">

        <Setter Property="OverridesDefaultStyle" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Template">
            <Setter.Value>

                <ControlTemplate x:Name="ButtonControl_tpl">
                    <Grid>
                        <Border x:Name="BaseRectangle" 
                        Background="#FF313138" 
                        CornerRadius="10,0,10,0">
                        </Border>
                        <Border x:Name="GlassRectangle" 
                        Background="{StaticResource GlassFX}" 
                        CornerRadius="10,0,10,0">
                        </Border>
                        <Border x:Name="GlowRectangle" 
                        Background="{StaticResource GlowFX}" 
                        CornerRadius="10,0,10,0" 
                        Opacity="0">
                        </Border>
                        <Border x:Name="ButtonBorder" 
                        CornerRadius="10,0,10,0" 
                        BorderBrush="#C8C4C4" 
                        Opacity="1" 
                        BorderThickness=".5">
                        </Border>
                        <ContentPresenter x:Name="ButtonContent" 
                        Opacity="1" 
                        Content="{Binding Path=Content, 
                        RelativeSource={RelativeSource TemplatedParent}}" 
                        HorizontalAlignment="center" 
                        VerticalAlignment="center">
                        </ContentPresenter>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <EventTrigger RoutedEvent="Button.MouseLeave">
                            <EventTrigger.Actions>
                                <BeginStoryboard Storyboard="{StaticResource GlowOut}">
                                </BeginStoryboard>
                            </EventTrigger.Actions>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="Button.MouseEnter">
                            <EventTrigger.Actions>
                                <BeginStoryboard Storyboard="{StaticResource GlowIn}">
                                </BeginStoryboard>
                            </EventTrigger.Actions>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="Button.LostFocus">
                            <EventTrigger.Actions>
                                <BeginStoryboard Storyboard="{StaticResource GlowOut}">
                                </BeginStoryboard>
                            </EventTrigger.Actions>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="Button.GotFocus">
                            <EventTrigger.Actions>
                                <BeginStoryboard Storyboard="{StaticResource GlowIn}">
                                </BeginStoryboard>
                            </EventTrigger.Actions>
                        </EventTrigger>
                        <Trigger Property="Button.IsPressed" Value="True">
                            <Setter Property="Background" TargetName="GlowRectangle" Value="{StaticResource GlowFXPressed}">
                            </Setter>
                            <Setter Property="Opacity" TargetName="ButtonContent"  Value="1">
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" TargetName="ButtonContent" Value=".3">
                            </Setter>
                            <Setter Property="Opacity" TargetName="ButtonBorder" Value=".5">
                            </Setter>
                            <Setter Property="Background" TargetName="GlassRectangle" Value="{StaticResource GlassFXDisabled}">
                            </Setter>
                        </Trigger>
                      
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>

        </Setter>
    </Style>
  <RadialGradientBrush x:Key="Window_Background">
    <GradientStop Color="#FFEF597D" Offset="0" />
    <GradientStop Color="#FF9494E2" Offset="1" />
  </RadialGradientBrush>
  <LinearGradientBrush x:Key="Window_Background1" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#FFBABABA" Offset="0" />
    <GradientStop Color="White" Offset="1" />
    <GradientStop Color="#FF657592" Offset="0" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="WhiteWindowForeground" Color="White"/>
</ResourceDictionary>